/*
 * @Author: yxiawen
 * @Date: 2022-01-17 21:17:44
 * @LastEditTime: 2022-01-24 16:18:04
 * @LastEditors: yxiawen
 * @Description:
 * @FilePath: /vite-project/mock/post.js
 */
const Mock = require("mockjs");

export default [
  {
    url: "/api/posts",
    method: "GET",
    response: () => {
      return Mock.mock({
        code: 0,
        message: "ok",
        type: "success",
        "data|10": [
          {
            "id|+1": 1,
            title: "@cparagraph( 2 )",
            create_time: "@date('yyyy-MM-dd')",
            author: "@cname()"
          }
        ]
      });
    }
  }
];
